home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / gnuchess.lha / Makefile < prev    next >
Makefile  |  1990-06-07  |  3KB  |  94 lines

  1. #
  2. # Makefile for CHESS
  3. #
  4. # Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc.
  5. #
  6. # This file is part of CHESS.
  7. #
  8. # CHESS is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY.  No author or distributor
  10. # accepts responsibility to anyone for the consequences of using it
  11. # or for whether it serves any particular purpose or works at all,
  12. # unless he says so in writing.  Refer to the CHESS General Public
  13. # License for full details.
  14. #
  15. # Everyone is granted permission to copy, modify and redistribute
  16. # CHESS, but only under the conditions described in the
  17. # CHESS General Public License.   A copy of this license is
  18. # supposed to have been given to you along with CHESS so you
  19. # can know your rights and responsibilities.  It should be in a
  20. # file named COPYING.  Among other things, the copyright notice
  21. # and this notice must be preserved on all copies.
  22. #
  23. # gnuchess  will be the curses-based chess.
  24. # gnuchessn will be the fancy-display-curses-based chess.
  25. # gnuchessr will be the xchess/chesstool based chess.
  26. #        (/usr/games/chesstool gnuchessr)
  27. #    for use with SUN's chesstool and X-window's xchess.
  28. #    To use with latter, add -DCHESSTOOL to the nondsp.o
  29. #    compilation lines (e.g. cc -O -DCHESSTOOL ...)
  30. # If you want to use the persistent transpositon table add
  31. # -DHASHFILE=\"$(LIBDIR)/gnuchess.hash\"
  32. # to the gnuchess.o compilation line. You also have to run gnuchess -t
  33. # To actually create the file. -t can also be used to report
  34. # statistics about the file or to resize it.
  35. #
  36. VERS=    3.1
  37. DIST=    README DOCUMENTATION Makefile Makefile.dos version.h\
  38.     gnuchess.h gnuchess.c\
  39.     uxdsp.c nondsp.c nuxdsp.c gnuchess.book Xchess
  40. BINDIR= /usr/gnu/bin
  41. LIBDIR= /usr/gnu/lib
  42. LCURSES=-lcurses -ltermcap
  43. HASH=    -DHASHFILE=\"$(LIBDIR)/gnuchess.hash\"
  44. BOOK=    -DBOOK=\"$(LIBDIR)/gnuchess.book\"
  45. #CC= cc
  46. CC=    gcc -W
  47. #CFLAGS= -O -Dinline=""        # for Aviion gcc-1.35
  48. CFLAGS=    -O -finline-functions -fstrength-reduce
  49.  
  50. all : gnuchess gnuchessr gnuchessn
  51.  
  52. gnuchess: gnuchess.o uxdsp.o
  53.     $(CC) $(CFLAGS) -o gnuchess gnuchess.o uxdsp.o $(LCURSES)
  54.  
  55. gnuchessr: gnuchess.o nondsp.o
  56.     $(CC) $(CFLAGS) -o gnuchessr gnuchess.o nondsp.o
  57.  
  58. gnuchessn: gnuchess.o nuxdsp.o
  59.     $(CC) $(CFLAGS) -o gnuchessn gnuchess.o nuxdsp.o $(LCURSES)
  60.  
  61. gnuchess.o: gnuchess.c
  62.     $(CC) $(CFLAGS) $(HASH) $(BOOK) -c gnuchess.c
  63.  
  64. uxdsp.o: uxdsp.c
  65.     $(CC) $(CFLAGS) -c uxdsp.c
  66.  
  67. nuxdsp.o: nuxdsp.c
  68.     $(CC) $(CFLAGS) -c nuxdsp.c
  69.  
  70. nondsp.o: nondsp.c
  71.     $(CC) $(CFLAGS) -DCHESSTOOL -c nondsp.c
  72.  
  73. lint:
  74.     lint gnuchess.c uxdsp.c nondsp.c nuxdsp.c
  75.  
  76. unprotoize:
  77.     unprotoize -c -DHASHFILE gnuchess.c uxdsp.c nondsp.c nuxdsp.c
  78.  
  79. protoize:
  80.     protoize -c -DHASHFILE gnuchess.c uxdsp.c nondsp.c nuxdsp.c
  81.  
  82. distribution:
  83.     tar cf - $(DIST) > gnuchess.tar
  84.     compress gnuchess.tar
  85.     mv gnuchess.tar.Z gnuchess-$(VERS).tar.Z
  86.  
  87. install:
  88.     cp gnuchessr $(BINDIR)/gnuchess.chesstool
  89.     cp gnuchess $(BINDIR)/gnuchess
  90.     cp gnuchess.book $(LIBDIR)/gnuchess.book
  91.  
  92. clean:
  93.     -rm gnuchess gnuchessr gnuchessn *.o
  94.